# -*- coding: utf-8 -*-
"""
Created on Wed May 15 15:25:35 2019

@author: yaoyu
"""

x = [2, 3, 0, 4, 1]
x.sort()
print(x)

words = ['Life', 'is', 'short', 'you', 'need', 'Python'] 
print(words.index('you'))

print(list('Life is short, you need Python.').count('is'))

language = list('PHP'); 
language[1:] = 'ython'; 
print(language) 


name=['Jacky']*10
score=range(85,95)
for i in range(10):
    print('{:2d},{:8s}:{:<3d}'.format(i, name[i], score[i]))
    
    
a=[x**2 for x in range(5)]
print(a)